import pygame
from pygame.locals import *
from clad import Gui,Window,VScroll,Button,Entry,Text,Image


pygame.init()
screen = pygame.display.set_mode((800,600))

gui = Gui()
font = 'bitstream.ttf'
window = Window((10, 120, 200, 300), 'Zeta Prime', font)
an_image = Image((30,40,100,100), pygame.image.load('orange5.png'))
type = Text((10,200,100,100), "Type: Sol IV", font, 10)
mass = Text((10,215,100,100), "Mass: 1.65^1000000", font, 10)
vscroll = VScroll((170, 35, 12, 160))
window.add(type)
window.add(mass)
window.add(an_image)
window.add(vscroll)
gui.add(window)

run = True
while run:
   screen.fill((0,0,0))
   gui.draw_debug()
   gui.draw()
   gui.update()
   pygame.display.flip()

   for event in pygame.event.get():
      if event.type == pygame.QUIT: run = False
      elif event.type == KEYDOWN:
         if event.key == K_ESCAPE:
            run = False
      elif event.type == KEYUP:
         pass
